package enum

type OrderType string

const (
	Limit    OrderType = "Limit"
	LimitIoc OrderType = "LimitIoc"
	Market      OrderType = "Market"
	MarketTop5  OrderType = "MarketTop5"
	MarketTop10 OrderType = "MarketTop10"

)

func (o OrderType) String() string {
	switch o {
	case Limit:
		return "Limit"
	case LimitIoc:
		return "LimitIoc"
	case Market:
		return "Market"
	case MarketTop5:
		return "MarketTop5"
	case MarketTop10:
		return "MarketTop10"
	default:
		return "unknown"
	}
}

func (o OrderType) Valid() bool {
	if o.String() == "unknown" {
		return false
	}
	return true
}
